package com.exam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("teacher")
@Accessors(chain = true)
public class Teacher {
    @TableId(value = "teacherId",type = IdType.AUTO)
    private Long teacherId;

    @TableField(value = "teacherName")
    private String teacherName;

    private String institute;

    private int sex;

    @TableField(value = "tel")
    private String tel;

    private String email;

    private String pwd;

    @TableField(value = "cardId")
    private String cardId;

    private String type;

    private Integer role;

    public Teacher(Long teacherId, String teacherName, String tel, String pwd, Integer role) {
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.tel = tel;
        this.pwd = pwd;
        this.role = role;
    }
}